package com.vulab.util;

/* **************************************************************************
 * Author: Srinivas Nelakuditi 
 * Company: VU Lab Inc.
 * URL: http://vulab.com
 * Core Competency: IT Training, Management Training & Career Mentoring
 * Blog URL: http://vulab.com/blog
 * forum URL:http://vulab.com/community
 * Date: March 5th 2009
 * 
 * 
 * Please modify the code as you wish and use it in any
 * commercial or free software and distribute it.
 * please keep the above author information intact.
 * 
 *****************************************************************************/

/* USAGE: use this program to create your database and table or domain in the database.
 * Please run this only once as if you already have data in your domain. It will be lost
 * on rerunning this program. 
 * This program will create a Database in SimpleDB named studentDB
 * A domain or table  named student will be created in studentDB
 */

import com.xerox.amazonws.sdb.*;

public class SimpleDBCreateDomain {

	public static void main(String[] args) {		
		SimpleDB studentDB = SimpleDBUtil.getDatabase();
		try {
			studentDB.createDomain("student");
		} catch (SDBException ex) {
			System.err.println("message : " + ex.getMessage());
			System.err.println("requestID : " + ex.getRequestId());
		}
	}

}